Skip to main content

Code Hike Scrollycoding Example

This page demonstrates how to use Code\u00A0Hike with Docusaurus to create interactive code walkthroughs. Scroll through the narrative on the left and watch the code on the right update in sync. The layout and animation behaviour are implemented in the Scrollycoding component defined in src/components/scrollycoding.tsx.

A Game of Thrones

A Game of Thrones is the first book in the A Song of Ice and Fire series by George R.R. Martin. Set in a world where seasons last for years, it introduces a complex plot and a wide cast of characters, ranging from noble families vying for the Iron Throne to the supernatural threats in the North.

A Clash of Kings

A Clash of Kings, the second book in the series, continues the epic saga. The Seven Kingdoms are plunged into war, with kings rising and falling. Meanwhile, Daenerys Targaryen seeks to return to Westeros with her growing dragons.

const houses = [
"Stark",
"Lannister",
"Baratheon",
"Targaryen",
]
const winner =
houses[
Math.floor(
Math.random() * houses.length,
)
]
console.log(`Iron Throne: ${winner}`)